clear
use property_tax_exemption_value.dta, replace


*Use this comment to create tables for four and nine percent credit projects, or construction type separately (used to create Table 4)
*keep if nineper==1
*keep if constructiontype=="A&R"

quietly foreach x in treasury30 marketratemean {
	gen abate_30yr`x'=abatevalueunit
quietly forvalue i=1/29 {
	replace abate_30yr`x'=abate_30yr`x'+((abatevalueunit*(1.02)^`i')/(1+`x')^`i')
}
}	

sum abate_30yrtreasury30 abate_30yrmarketratemean [fweight=liunits]

collapse (mean) abate_30yrtreasury30 abate_30yrmarketratemean [fweight=liunits]


